import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutterdemo/0demo/common/common.dart';
import 'package:flutterdemo/flutter_share/custom_list_view_page.dart';
import 'package:flutterdemo/flutter_share/native_channel_test_page.dart';
import 'package:flutterdemo/flutter_share/scaffold_page.dart';
import 'package:flutterdemo/flutter_share/state_widget_page.dart';

void main() {
  runApp(MaterialApp(
    home: HomePage(),
  ));
}

class HomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    setStatusBarWhite(); // 设置沉浸式状态栏并修改状态栏颜色，对应scaffold brightness
    return Scaffold(
      appBar: AppBar(
        title: Text("flutter share"),
      ),
      body: ListView(children: <Widget>[
        InkWell(
          onTap: () => Navigator.push(context, CupertinoPageRoute(builder: (context) => StateWidgetPage())),
          child: ListTile(
            leading: Icon(Icons.title),
            title: Text("Widgets' State"),
          ),
        ),
        InkWell(
          onTap: () => Navigator.push(context, CupertinoPageRoute(builder: (context) => ScaffoldPage())),
          child: ListTile(
            leading: Icon(Icons.title),
            title: Text("Use Scaffold"),
          ),
        ),
        InkWell(
          onTap: () => Navigator.push(context, CupertinoPageRoute(builder: (context) => CustomListViewPage())),
          child: ListTile(
            leading: Icon(Icons.title),
            title: Text("CustomListViewPage"),
          ),
        ),
        InkWell(
          onTap: () => Navigator.push(context, CupertinoPageRoute(builder: (context) => NativeChannelTestPage())),
          child: ListTile(
            leading: Icon(Icons.title),
            title: Text("Native Channel"),
          ),
        )
      ]),
    );
  }
}
